package com.ruoyi.system.service.smy;

import com.ruoyi.common.core.domain.smy.MallGoodsAttribute;

import java.util.List;

public interface IMallGoodsAttributeService {

	public MallGoodsAttribute selectMallGoodsAttributeById(Long id);

	public List<MallGoodsAttribute> selectMallGoodsAttributeList(MallGoodsAttribute mallGoodsAttribute);

	public int insertMallGoodsAttribute(MallGoodsAttribute mallGoodsAttribute);

	public int updateMallGoodsAttribute(MallGoodsAttribute mallGoodsAttribute);

	public int deleteMallGoodsAttributeByIds(Long[] ids);

	public int deleteMallGoodsAttributeById(Long id);

	/**
	 * 获取商品规格父级列表
	 * @Date 2022/10/26 14:36
	 * @author ZhanCheng.Li
	 * @param mallGoodsAttribute
	 * @return
	 */
	List<MallGoodsAttribute> selectAttributeParentPage(MallGoodsAttribute mallGoodsAttribute);


	/**
	 * 获取传入规格类目的所有下级规格值
	 * @Date 2022/10/26 16:25
	 * @author ZhanCheng.Li
	 * @param mallGoodsAttribute
	 * @return
	 */
	List<MallGoodsAttribute> getSubAttributeList(MallGoodsAttribute mallGoodsAttribute);

	/**
	 * 保存/更新商品规格
	 * 传入数据包含下级商品规格
	 * @Date 2022/10/26 16:22
	 * @author ZhanCheng.Li
	 * @param mallGoodsAttribute
	 */
	void saveAttributeWithSubList(MallGoodsAttribute mallGoodsAttribute);
}
